System and method for calibration of pulse width modulation signals with higher resolution increments

ABSTRACT

A system and method for calibrating a pulse width modulation (PWM) signal that extends the on time by a higher resolution increment. The system comprises a PWM generator that receives a VDDIO rail to generate first and second PWM signals, the second PWM signal having an on time extended by the higher resolution increment having a commanded length. The system further comprises a VDDIO circuit that receives the VDDIO rail and outputs a VDDIO signal. First and second analog-to-digital converters are configured to generate a first and second sets of PWM samples and first and second sets of VDDIO samples. A microcontroller is configured to calculate an actual increment length based on the samples, and to compensate for a difference between the commanded length and the actual increment length.

CROSS REFERENCE TO RELATED APPLICATION

This application claims priority to U.S. Provisional Application No. 62/770,423 filed Nov. 21, 2018, the contents of which are incorporated by reference herein.

BACKGROUND

Pulse width modulation (PWM) signals have an “on” or high portion and an “off” or low portion. The length of the on portion, or “on time,” of a PWM signal is generally based on the duty cycle, number indicating the percentage of a signal period that is on or high. For example, a 25 MHz signal with a 75% duty cycle has a period of 40 ns with 30 ns (i.e., 75% of 40 ns) being “on” and 10 ns being “off,” The duty cycle, and therefore the on time of the signal, may generally be varied (increased or decreased) by an amount equal to the period of the internal dock of the PWM generator. For example, if the PWM generator has an internal dock of 100 MHz and thus a period of 10 ns, the duty cycle may be increased or decreased by increments of 10 ns. These 10 ns increments are referred to herein as lower resolution increments.

In some applications, however, there may be a need to more finely or precisely control a PWM signal so that the on time is increased or decreased with finer granularity than is possible using the available lower resolution increment. Such fine tuning may be accomplished by PWM generators capable of commanding the generator to add a higher resolution increment in the PWM signal, the higher resolution increment being of a higher resolution or granularity than the lower resolution increment. For example, where the lower resolution increment is 10 ns based on the internal clock of the PWM generator, it may be desirable to increase the on time by less than 10 ns (e.g., 1 ns).

The higher resolution increments added to PWM signals are subject to variance due to process, voltage, and temperature. Even at a fixed voltage and temperature, the higher resolution increments have individual variance due to silicon processes. Runtime calibration techniques are employed that provide an average higher resolution increment size, and therefore normalize the higher resolution increment in a given signal. These techniques, however, do not account for increment-to-increment variation or ensure the accuracy of a particular higher resolution increment.

Some applications, for example a Light Detection and Ranging (LiDAR) system, may require increased accuracy when determining the length of the higher resolution increment because a substantial variance may impact the accuracy of the resulting distance measurements. For example, if a 1 ns higher resolution increment is commanded to the laser driver of the LiDAR system, based on process variation, it may actually be 0.8 ns or 1.2 ns. This error may affect the robustness of the processing algorithms in some applications.

SUMMARY

Illustrative methods described herein include a method of calibrating a pulse width modulation (PWM) signal that includes using a VDDIO rail to generate a first PWM signal having an on time based on a duty cycle, the first PWM signal being generated without extending the on time by a commanded increment, and concurrently sampling the first PWM signal and the VDDIO rail to generate a first set of PWM samples and a first set of VDDIO samples. The method also includes generating a second PWM signal using the VDDIO ran, the second PWM signal being generated to extend the on time by the commanded increment having a commanded length, and concurrently sampling the second PWM signal and the VDDIO rail to generate a second set of PWM samples and a second set of VDDIO samples. The method further includes calculating an actual increment length based on the first and second sets of PWM samples and VDDIO samples, and compensating for a difference between the commanded increment length and the actual increment length.

Illustrative systems described herein include 11. A system for calibration of a pulse width modulation (PWM) signal that includes a generator configured to generate first and second PWM signals using a VDDIO rail, the first and second PWM signals each having an on time based on a duty cycle, the generator further configured to generate the first PWM signal without extending the on time by a commanded increment and to generate the second PWM signal by extending the on time by the commanded increment having a commanded length. The system also includes a VDDIO circuit that receives the VDDIO rail and outputs a VDDIO signal, and first and second analog-to-digital converters (ADCs) configured to concurrently sample the first PWM signal and the VDDIO signal, respectively, to generate a first set of PWM samples and a first set of VDDIO samples, respectively, to concurrently sample the second PWM signal and the VDDIO signal, respectively, and to generate a second set of PWM samples and a second set of VDDIO samples, respectively. The system further includes a microcontroller configured to calculate an actual increment length based on the first and second sets of PWM samples and VDDIO samples.

BRIEF DESCRIPTION OF THE DRAWINGS

For a detailed description of various examples, reference will now be made to the accompanying drawings in which:

FIGS. 1A and 1B illustrate examples of signals in accordance with the illustrative systems and methods described herein;

FIG. 2 illustrates an example PWM signal calibration system described herein;

FIG. 3 illustrates an example PWM signal calibration system described herein;

FIG. 4 illustrates an example PWM signal calibration system described herein; and

FIG. 5 illustrates an example method for calibrating a PWM signal described herein.

DETAILED DESCRIPTION

In this description, the term “couple” or “couples” means either an indirect or direct wired or wireless connection. Thus, if a first device couples to a second device, that connection may be through a direct connection or through an indirect connection via other devices and connections. The recitation “based on” means “based at least in part on.” Therefore, if X is based on Y, X may be a function of Y and any number of other factors.

FIGS. 1A and 1B show illustrative PWM signals 100 and 100′, respectively. Both signals 100 and 100′ may have a high frequency to facilitate filtering, for example 25 MHz. Both signals 100 and 100′ have a period p. In the case of a 25 MHz signal, the period for both signals 100 and 100′ would be 40 ns. Both signals 100 and 100′ include lower resolution portion 101 having lower resolution increments 101 a, 101 b, 101 c, which may be, for example, 10 ns. Both signals 100 and 100′ may also include in-band noise portion 102. In-band noise portion 102 may include, for example, jitter and/or slew rate. Unlike PWM signal 100, the on time of PWM signal 100′ has been increased or extended by higher resolution increment 103, which has a length less than the length of any one of lower resolution increments 101 a, 101 b, 101 c.

Because some applications, for example LiDAR, require increased accuracy, it is often important to calibrate the higher resolution increments (e.g., 103) to ensure that they are accurate and/or that any inaccuracies can be measured and accounted for. FIGS. 2-4 shows examples of PWM signal calibration systems that perform such calibrations.

In example calibration system 1 of FIG. 2, the PWM signal calibration system 1 includes a microcontroller 4, a signal calibration circuit 2, and a VDDIO measurement circuit 3. The example microcontroller 4 includes a PWM generator 5. PWM generator 5 is coupled to a VDDIO rail 14 to receive a VDDIO voltage to generate PWM signals (e.g., PWM signals 100 and 100′) by generating a base signal and a carrier signal and modulating the base signal with a carrier signal. Microcontroller 4 also includes core 24, which includes and firmware 20 having software 21. Core 24 controls PWM generator 5 to generate PWM signals (e.g., PWM signals 100 and 100′) by providing values for, for example, a PWM period, a PWM duty cycle percentage representing the lower resolution portion 101 as a percentage of the period p and a higher resolution increment (the amount by which to increase the duty cycle) using PWM period input line 25, duty cycle input line 26 and higher resolution increment input line 27. Microcontroller 4 in this example also includes demultiplexer 6, which allows switching of the output of PWM generator 5 between an operational signal application path 7 and a signal calibration circuit 2 based on an output select signal 23 received from the core 24. Demultiplexer 6 may be an internal pin mux, which is a hardware component that routes a signal on an input pin to one of many output pins. Demultiplexer 6 may be provided as part of the microcontroller 4 or may be external to the microcontroller 4. Microcontroller 4 also includes memory 22.

Signal calibration circuit 2 is coupled to the microcontroller 4 and includes a low pass filter 8 which may, for example, filter out high-frequency noise (different from in-band noise 102) and the carrier frequency of the signal (e.g., PWM signals 100 or 100′). The high-frequency noise filtered out by low pass filter 8 may be, for example, a variance in the duty cycle. Low pass filter 8 may also perform digital to analog conversion of the signal. Low pass filter 8 may be a pulse width modulation digital-to-analog converter (PWM DAC) and may convert the signal (e.g., PWM signals 100 or 100′) to a continuously variable analog signal by filtering out the carrier frequency. Low pass filter 8 may be passive or active.

Signal calibration circuit 2 also includes a unity gain buffer 10 which may, for example, reduce errors due to impedance mismatch. The output of the unity gain buffer 10 is coupled to an analog-to-digital converter (ADC) 15 in the microcontroller 4. The unity gain buffer 10 may have a lower output impedance than low pass filter 8, and thus by including the unity gain buffer 10 in the signal path between the low pass filter 8 and the ADC 15, the accuracy of the ADC 15 is improved. For example, driving ADC 15, which may have its own input impedance, with a high impedance signal (e.g., directly from the low pass filter 8) may increase errors in the ADC 15. By instead driving the input of the ADC 15 with a lower output impedance unity gain buffer 10, errors in ADC 15 may be reduced.

The VDDIO measurement circuit 3 is usable to measure the VDDIO voltage from the VDDIO rail 14 used by the PWM generator 5 to generate the PWM signals 100 and 100′. The measured VDDIO voltage may be used to isolate the values of the commanded signal in PWM signals 100 and 100′, and to determine the value of in-band noise 102 and higher resolution increment 103, as described in more detail below with respect to FIG. 5. The VDDIO measurement circuit 3 includes low pass filter 12, which may comprise resistors R1 and R2 and capacitor C1. Resistors R1 and R2 may comprise a voltage divider. In the example of FIG. 2, R1 is connected to R2 and to C1 at a node N1. The node N1 represents the output signal of the low pass filter 12. Low pass filter 12 has an equivalent magnitude response and phase response to low pass filter 8 in the signal calibration circuit 2 such that it filters the same frequency range (e.g., high frequency noise) as low pass filter 8. For example, the resistors R1, R2 of low pass filter 12 should be sized such that low pass filter 12 has an equivalent 3 db corner frequency as low pass filter 8. Low pass filter 12 is coupled between VDDIO rail 14 and unity gain buffer 13, which is equivalent to the unity gain buffer 10 in the signal calibration circuit 2. The output of unity gain buffer 13 is coupled to ADC 16 in microcontroller 4. ADCs 15 and 16 may be internal to, or external from, microcontroller 4.

FIG. 3 shows another example of a PWM signal calibration system 1′. In this example, the PWM signal calibration system 1′ includes a microcontroller 4′, a signal calibration circuit 2′, and a VDDIO measurement circuit 3. Microcontroller 4′ of PWM signal calibration system 1′ includes PWM generators 5 ₁, 5 ₂, . . . 5 _(n), which are each controlled by respective PWM period input lines (251, 252, . . . 25 n), duty cycle input lines (261, 262, . . . 26 n) and higher resolution increment input line (271, 272, . . . 27 n) coupled to the core 24. The respective outputs of the PWM generators 5 ₁, 5 ₂, . . . 5 _(n) are coupled to demultiplexers 6 ₁, 6 ₂, . . . 6 _(n). Each demultiplexer 6 ₁, 6 ₂, . . . 6 _(n) allows switching of the output of respective PWM generator 5 ₁, 5 ₂, . . . 5 _(n) between a respective operational signal application path 7 ₁, 7 ₂, . . . 7 _(n) and a respective low pass filter 8 ₁, 8 ₂, . . . 8 _(n) in signal calibration circuit 2′ based on a respective output select signal 23 ₁, 23 ₂, . . . 23 _(n) provided by core 24. Each demultiplexer 6 ₁, 6 ₂, . . . 6 _(n) may be an internal pin mux and may be provided as part of the microcontroller 4′ or may be external to the microcontroller 4′. Each PWM generator 5 ₁, 5 ₂, . . . 5 _(n) and/or demultiplexer 6 ₁, 6 ₂, . . . 6 _(n) may be inside or outside microcontroller 4′. VDDIO measurement circuit 3 may be identical to the VDDIO measurement circuit 3 of FIG. 2.

Signal calibration circuit 2′ includes a multiplexer 30 that selectively couples each low pass filter 8 ₁, 8 ₂, . . . 8 _(n) to unity gain buffer 10. Based on a circuit select signal 31 provided by core 24 of microcontroller 4, multiplexer 30 will provide to unity gain buffer 10 the signal generated by one of PWM generators 5 ₁, 5 ₂, . . . 5 _(n) and provided to respective the low pass filter 8 ₁, 8 ₂, . . . 8 _(n). Thus, the PWM signal calibration system 1′ uses multiplexer 30 to allow multiple PWM generators (5 ₁, 5 ₂, . . . 5 _(n)) to be calibrated using microcontroller 4 and VDDIO measurement circuit 3.

FIG. 4 shows another example of a PWM signal calibration system 1″. In this example, the PWM signal calibration system 1″ includes a microcontroller 4′, a signal calibration circuit 2″, and a VDDIO measurement circuit 3. Microcontroller 4′ may be identical to microcontroller 4′ of FIG. 3 and includes PWM generators 5 ₁, 5 ₂, . . . 5 _(n), which are each controlled by respective PWM period input lines (251, 252, . . . 25 n), duty cycle input lines (261, 262, . . . 26 n) and higher resolution increment input line (271, 272, . . . 27 n) coupled to the core 24. The respective outputs of the PWM generators 5 ₁, 5 ₂, . . . 5 _(n) are coupled to demultiplexers 6 ₁, 6 ₂, . . . 6 _(n). Each demultiplexer 6 ₁, 6 ₂, . . . 6 _(n) allows switching of the output of respective PWM generator 5 ₁, 5 ₂, . . . 5 _(n) between a respective operational signal application path 7 ₁, 7 ₂, . . . 7 _(n) and signal calibration circuit 2″ based on a respective output select signal 23 ₁, 23 ₂, . . . 23 _(n) provided by core 24.

Signal calibration circuit 2″ includes multiplexer 41, low pass filter 8 and unity gain buffer 10. Multiplexer 41 receives the outputs of each demultiplexer 6 ₁, 6 ₂, . . . 6 _(n) as inputs and selectively outputs one of these inputs based on circuit select signal 32 provided by core 24 of microcontroller 4. Low pass filter 8 couples the output of multiplexer 41 to unity gain buffer 10. Each demultiplexer 6 ₁, 6 ₂, . . . 6 _(n) may be an internal pin mux and may be provided as part of the microcontroller 4′ or may be external to the microcontroller 4′. Each PWM generator 5 ₁, 5 ₂, . . . 5 _(n) and/or demultiplexer 6 ₁, 6 ₂, . . . 6 _(n) may be inside or outside microcontroller 4′. VDDIO measurement circuit 3 is the same as the VDDIO measurement circuit 3 of FIGS. 2 and 3.

PWM signal calibration signal 1″ is similar to PWM signal calibration signal 1′ except the multiplexer in PWM signal calibration signal 1″ is placed before the low pass filter. In this way, PWM signal calibration signal 1″ allows for multiple PWM generators (5 ₁, 5 ₂, . . . 5 _(n)) while also eliminating the need for multiple low pass filters.

FIG. 5 shows an illustrative method for calibrating a PWM signal (e.g., signal 100′ of FIG. 1B) having its on time increased or extended by a higher resolution increment (e.g., 103 of FIG. 1B) using, for example, the PWM signal calibration system 1 of FIG. 2, but applicable as well to PWM signal calibration systems 1′ (FIG. 3) and 1″ (FIG. 4). At step 301, PWM generator 5 generates a first PWM signal 100 that includes an on time specified in lower resolution increments (e.g., increments 101 a, 101 b, and/or 101 c), which may include in-band noise 102, but does not include a higher resolution increment to increase the on time. PWM generator 5 may generate signal 100 based on a VDDIO voltage provided by VDDIO rail 14 and input received from core 24 on one or more of PWM period input line 25, duty cycle input line 26 and higher resolution increment input line 27. The signal 100 has a duty cycle, which may be any duty cycle, for example a 75% duty cycle. The signal may be, for example, a 25 MHz signal with a period of 40 ns. At step 302, the low pass filter 8 filters out, for example, high frequency noise and the carrier frequency, and converts the PWM signal 100 to an analog signal, and low pass filter 12 filters VDDIO rail 14 to remove the same noise components removed by low pass filter 8.

At step 303, ADCs 15 and 16 concurently sample the filtered first PWM signal 100 and the filtered VDDIO rail, respectively, to generate a set of samples (A) of each respective signal/voltage. The sampling rate implemented by the ADCs 15, 16 is sufficiently high to satisfy the Nyquist Theorem. For example, the sampling rate may be at least 2 times the frequency of the low pass filtered signals' analog bandwidth. An example would be 128 samples at a sampling rate of 1 Msamples/second. The sampling rate may be sufficiently high to allow for proper sampling and accounting for the waveform's AC characteristics. For example, if the low pass filter 8 has a −70 dB cutoff at 200 KHz, and the ADC 15 is capable of 70 dB effective resolution, then the sampling rate may be greater than or equal to 400 Ksamples/second.

At step 304 in the example of FIG. 4, core 24 of the microcontroller 4 calculates an average voltage of the samples of the first PWM signal (PWM_AVG_(A)) and an average of the set of samples of VDDIO (VDDIO_AVG_(A)). PWM_AVG_(A) represents the sum of the measured lower resolution portion 101 and in-band noise 102 of the PWM signal 100 generated at step 301. In the illustrative filter 12 of FIG. 2, ADC 16 samples VDDIO at N1 as divided by R1 and R2. Thus, the sampled VDDIO voltage may be first modified to compensate for the divided voltage. For example, if the voltage divider (R1 and R2) divides the VDDIO in half, core 24 of microcontroller 4 will double the sampled VDDIO voltage to compensate for the divided voltage and will then calculate the average of the compensated values.

At step 305, core 24 of the microcontroller 4 prorates the calculated average VDDIO (VDDIO_AVG_(A)) based on the duty cycle, as specified by the core 24 on duty cycle input line 26, to obtain a duty-cycle-prorated average VDDIO (VDDIO_DUTY%_(A)) by using the following equation: VDDIO_DUTY%_(A)=duty_cycle_percentage×VDDIO_AVG_(A)

VDDIO_DUTY%_(A) represents the intended or commanded value of the on time or lower resolution portion 101 of PWM signal 100 because the VDDIO rail 14 was used by PWM generator 5 to determine the amplitude of the on time or lower resolution portion 101. VDDIO_DUTY%_(A), however, will not include the in-band noise 102. duty_cycle_percentage is the lower resolution portion 101 as a percentage of p of signal 100, as specified by the core on duty cycle input line 26. duty_cycle_percentage may be a parameter stored in memory 22 and may be provided by core 24 to PWM generator 5 by duty cycle input line 26. At step 306, core 24 of the microcontroller 4 calculates the in-band noise component 102 (NOISE_(A)) of PWM signal 100 by subtracting the average commanded value (VDDIO_DUTY%_(A)) from the average measured value (PWM_AVG_(A)), which as described above includes both the measured on time 101 and in-band noise 102. The noise may be calculated using the following equation: NOISE_(A)=PWM_AVG_(A)−VDDIO_DUTY%_(A)

At step 307, repeat steps 301-305 for the PWM signal 100′. To generate PWM signal 100′, core 24 will provide the same PWM period and PWM duty cycle on PWM period input line 25 and duty cycle input line 26 that it provided for PWM signal 100. Unlike with signal 100, for signal 100′ core 24 will also provide a value for the higher resolution increment on higher resolution increment input line 27. Signal 100′ has lower resolution portion 101 specified by the same lower resolution increments (e.g., the same of increments 101 a, 101 b, and/or 101 c) as PWM signal 100 and includes substantially similar in-band noise 102 effects. The on time of pWM signal 100′, however, is extended by a commanded higher resolution increment 103 as specified by the core 24 on higher resolution increment input line 27.

Repeating steps 301-305 for PWM signal 100′ will generate a set (B) of samples of PWM signal 100′ and a second set of samples of VDDIO voltage, resulting in an average PWM voltage value of the second set (PWM_AVG_(B)), average VDDIO value of the second set (VDDIO_AVG_(B)) and average VDDIO of the second set prorated for the duty cycle of PWM signal 100 (VDDIO_DUTY%_(B)). PWM_AVG_(B) represents the sum of the measured value of lower resolution portion 101, the measured value of higher resolution increment 103 and in-band noise 102 of the PWM signal 100′.

At step 308, the core 24 of the microcontroller 4 calculates the difference in the average voltage of the PWM signal 100′ caused by the higher resolution increment 103 by subtracting the lower resolution portion 101 (represented by VDDIO_DUTY%_(B)) and the in-band noise component 102 from the average value of the samples of PWM signal 100′ (PWM_AVG_(B)), for example, by using the following equation: Increment_(voltage)=PWM_AVG_(B)−VDDIO_DUTY%_(B)−NOISE_(A)

At step 309, the core 24 of the microcontroller 4 translates the increment as a voltage into time (Increment_(time)), which corresponds to the duration of higher resolution increment 103, by using the following equation: Increment_(time)=(Increment_(voltage)/VDDIO_AVG_(B))×Period where Period is the period p of the PWM signal 100′ of FIG. 1B (e.g., 40 ns). The calculated increment Increment_(time) may be stored in memory 22 with the commanded increment. At step 310, the calculated increment is used in future uses of PWM generator 5 to generate a PWM signal with the same commanded higher resolution increment 103 for use on operational signal application path 7. For example, the calculated increment may be used to update a transfer function or lookup table stored in memory 22 associated with a higher resolution increment value (e.g., 103) such that next time a PWM signal with that the specified higher resolution increment is generated, the core 24 can command a higher resolution increment on higher resolution increment input line 27 that compensates for the difference. As another example, if a 1 ns increment is commanded, but the calibration reveals that the PWM generator 5 actually generates a 0.8 ns or 1.2 ns increment, the core 24 can compensate for the difference and attempt to generate a higher resolution increment that is closer to 1 ns by commanding a slightly higher or lower higher resolution increment on higher resolution increment input line 27. Alternatively, a reader/receiver of the PWM signal can compensate for the difference. For example, the reader/receiver can know to expect a 0.8 ns or 1.2 ns increment rather than a 1 ns increment, and compensate accordingly.

The process of FIG. 5 may be performed for other higher resolution increment values. The process of FIG. 5 may be repeated multiple times, and the results averaged to increase the accuracy of the calibration. The steps above described as being performed by microcontroller 4 may be performed by executing firmware 20 having software 21. The process of FIG. 5 may be performed for example, during or after manufacture, at startup and/or during runtime (e.g., at regular intervals).

Modifications are possible in the described embodiments, and other embodiments are possible, within the scope of the claims. 

What is claimed is:
 1. A method of calibrating a pulse width modulation (PWM) signal, the method comprising: using a VDDIO rail to generate a first PWM signal having an on time based on a duty cycle, the first PWM signal being generated without extending the on time by a commanded increment; concurrently sampling the first PWM signal and the VDDIO rail to generate a first set of PWM samples and a first set of VDDIO samples; generating a second PWM signal using the VDDIO rail, the second PWM signal being generated to extend the on time by the commanded increment having a commanded length; concurrently sampling the second PWM signal and the VDDIO rail to generate a second set of PWM samples and a second set of VDDIO samples; calculating an actual increment length based on the first and second sets of PWM samples and VDDIO samples; and compensating for a difference between the commanded increment length and the actual increment length.
 2. The method of claim 1, further comprising: filtering the first PWM signal, the second PWM signal and the VDDIO rail before the respective sampling.
 3. The method of claim 2, wherein the filtering comprises a first low pass filter filtering the first PWM signal and the second PWM signal and a second low pass filter filtering the VDDIO rail.
 4. The method of claim 3, wherein the first low pass filter and second low pass filter have substantially equivalent magnitude and phase responses.
 5. The method of claim 1, wherein the calculating the actual increment length comprises: calculating an average voltage of the second set of PWM samples; calculating an average voltage of the second set of VDDIO samples; prorating the average voltage of the second set of VDDIO samples based on the duty cycle to create a prorated second VDDIO average; calculating a noise component of the first PWM signal; calculating an actual increment voltage by subtracting the noise component and the prorated second VDDIO average from the average voltage of the second set of PWM samples; and translating the actual increment voltage into the actual increment length.
 6. The method of claim 5, wherein the calculating the noise component comprises: calculating an average voltage of the first set of PWM samples; calculating an average voltage of the first set of VDDIO samples; prorating the average voltage of the first set of VDDIO samples based on the duty cycle to create a prorated first VDDIO average; and subtracting the prorated first VDDIO average from the average voltage of the first set of PWM samples.
 7. The method of claim 5, further comprising repeating the generating and sampling steps for a third PWM signal without the commanded increment and a fourth PWM signal with the commanded increment; and calculating the actual increment length by averaging average voltages of samples of the third and fourth PWM signals with the average voltages of the first and second set of samples.
 8. The method of claim 1, wherein the compensating for the difference between the commanded increment length and the actual increment length comprises: using the actual increment length to update a transfer function associated with the commanded increment length.
 9. The method of claim 1, wherein the compensating for the difference between the commanded increment length and the actual increment length comprises: using the actual increment length to update a lookup table associated with the commanded increment length.
 10. The method of claim 1, wherein a number of samples in the first set of PWM samples is equal to a number of samples in the first set of VDDIO samples, and a number of samples in the second set of PWM samples is equal to a number of samples in the second set of VDDIO samples.
 11. A system for calibration of a pulse width modulation (PWM) signal, the system comprising: a generator configured to generate first and second PWM signals using a VDDIO rail, the first and second PWM signals each having an on time based on a duty cycle, the generator further configured to generate the first PWM signal without extending the on time by a commanded increment and to generate the second PWM signal by extending the on time by the commanded increment having a commanded length; a VDDIO circuit that receives the VDDIO rail and outputs a VDDIO signal; first and second analog-to-digital converters (ADCs) configured to concurrently sample the first PWM signal and the VDDIO signal, respectively, to generate a first set of PWM samples and a first set of VDDIO samples, respectively, to concurrently sample the second PWM signal and the VDDIO signal, respectively, and to generate a second set of PWM samples and a second set of VDDIO samples, respectively; and a microcontroller configured to calculate an actual increment length based on the first and second sets of PWM samples and VDDIO samples.
 12. The system of claim 11, wherein the first and second ADCs are included in the microcontroller.
 13. The system of claim 11, further comprising: a first low pass filter configured to filter the first and second PWM signals before sampling; and a second low pass filter configured to filter the VDDIO rail before sampling.
 14. The system of claim 13, wherein the first low pass filter and the second low pass filter have substantially equivalent magnitude and phase responses.
 15. The system of claim 13, wherein the first low pass filter and the second low pass filter comprise passive filters.
 16. The system of claim 13, further comprising: a first unity gain buffer arranged between the first low pass filter and the first ADC; and a second unity gain buffer arranged between the second low pass filter and the second ADC.
 17. The system of claim 16, further comprising a multiplexor arranged before the first unity gain buffer and configured to switchably allow sampling of multiple PWM calibration circuits.
 18. The system of claim 11, further comprising a demultiplexer configured to switch an output of the generator between a PWM application path and the PWM calibration circuit.
 19. The system of claim 11, wherein the microcontroller is further configured to calculate the actual increment length by: calculating an average voltage of the second set of PWM samples; calculating an average voltage of the second set of VDDIO samples; prorating the average voltage of the second set of VDDIO samples based on the duty cycle to create a prorated second VDDIO average; calculating a noise component of the first PWM signal; calculating an actual increment voltage by subtracting the noise component and the prorated second VDDIO average from the average voltage of the second set of PWM samples; and translating the actual increment voltage into the actual increment length.
 20. The system of claim 19, wherein the microcontroller is further configured to calculate the noise component by: calculating an average voltage of the first set of PWM samples; calculating an average voltage of the first set of VDDIO samples; prorating the average voltage of the first set of VDDIO samples based on the duty cycle to create a prorated first VDDIO average; and subtracting the prorated first VDDIO average from the average voltage of the first set of PWM samples. 